﻿Imports System.Text
Imports TapdCollect.Utils.DataBase
Imports TapdCollect.Utils.DataBase.API
Imports TapdCollect.Utils.DataBase.Model
Imports TapdCollect.Utils.FileSystem.Dict
Imports TapdCollect.Utils.FileSystem.Impl.Log
Imports TapdCollect.Utils.FileSystem.Impl.Path

Namespace Tapd.Global.Impl
    Public Class IM_InitializeDataBase
        Public Shared Sub Init()
            Init_tapd_project()
            Init_tapd_statusmap()
            Init_tapd_custom_fields_settings()
            Init_tapd_story_categories()
            Init_tapd_tcase_categories()
            Init_tapd_stories()
            Init_tapd_bugs()
            Init_tapd_tasks()
            Init_tapd_test_plans()
            Init_tapd_tcases()
            Init_tapd_story_changes()
            Init_tapd_bug_changes()
            Init_tapd_launch_forms()
            Init_tapd_releases()
            Init_tapd_relations()
            Init_tapd_modules()
            Init_tapd_timesheets()
            Init_tapd_iterations()
            Init_tapd_comments()
        End Sub

        ''' <summary>
        '''     01、初始化项目表
        ''' </summary>
        Private Shared Sub Init_tapd_project()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_project`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_project`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目 id',")
            StrBuff.AppendLine($"         `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目名称',")
            StrBuff.AppendLine($"         `pretty_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '同项目 id',")
            StrBuff.AppendLine($"         `status` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目状态',")
            StrBuff.AppendLine($"         `secrecy` varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '保密',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目创建时间',")
            StrBuff.AppendLine($"         `creator_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目创建者 id',")
            StrBuff.AppendLine($"         `member_count` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目人数',")
            StrBuff.AppendLine($"         `creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目创建者的名字和邮箱',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        
        ''' <summary>
        '''     02、初始化工作流状态中英文名对应关系表
        ''' </summary>
        Private Shared Sub Init_tapd_statusmap()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_statusmap`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_statusmap`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `status_system` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统',")
            StrBuff.AppendLine($"         `status_key` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '键',")
            StrBuff.AppendLine($"         `status_value` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '值',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     03、初始化自定义字段配置表
        ''' </summary>
        Private Shared Sub Init_tapd_custom_fields_settings()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_custom_fields_settings`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_custom_fields_settings`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段配置的ID',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属项目ID',")
            StrBuff.AppendLine($"         `entry_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属实体对象',")
            StrBuff.AppendLine($"         `custom_field` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段标识（英文名）',")
            StrBuff.AppendLine($"         `type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '输入类型',")
            StrBuff.AppendLine($"         `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段显示名称',")
            StrBuff.AppendLine($"         `options` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段可选值',")
            StrBuff.AppendLine($"         `enabled` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否启用',")
            StrBuff.AppendLine($"         `sort` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '显示时排序系数',")
            StrBuff.AppendLine($"         `memo` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注信息',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     04、初始化需求分类表
        ''' </summary>
        Private Shared Sub Init_tapd_story_categories()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_story_categories`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_story_categories`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'id',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '需求分类名称',")
            StrBuff.AppendLine($"         `description` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '需求分类描述',")
            StrBuff.AppendLine($"         `parent_id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '父分类ID',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `modified` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改时间',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     05、初始化测试用例分类表
        ''' </summary>
        Private Shared Sub Init_tapd_tcase_categories()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_tcase_categories`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_tcase_categories`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'id',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '目录名称',")
            StrBuff.AppendLine($"         `description` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '目录描述',")
            StrBuff.AppendLine($"         `parent_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '父目录ID',")
            StrBuff.AppendLine($"         `modified` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改时间',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `creator` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '目录创建人',")
            StrBuff.AppendLine($"         `modifier` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '目录最后修改人',")
            StrBuff.AppendLine($"         `sorting` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '目录排序序号',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     06、初始化需求表
        ''' </summary>
        Private Shared Sub Init_tapd_stories()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_stories`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_stories`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ID',")
            StrBuff.AppendLine($"         `name` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '标题',")
            StrBuff.AppendLine($"         `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '详细描述',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `creator` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `modified` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改时间',")
            StrBuff.AppendLine($"         `status` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态',")
            StrBuff.AppendLine($"         `owner` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前处理人',")
            StrBuff.AppendLine($"         `cc` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '抄送人',")
            StrBuff.AppendLine($"         `begin` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预计开始',")
            StrBuff.AppendLine($"         `due` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预计结束',")
            StrBuff.AppendLine($"         `size` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '规模',")
            StrBuff.AppendLine($"         `priority` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '优先级',")
            StrBuff.AppendLine($"         `developer` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开发人员',")
            StrBuff.AppendLine($"         `iteration_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '迭代',")
            StrBuff.AppendLine($"         `test_focus` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测试重点',")
            StrBuff.AppendLine($"         `type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型',")
            StrBuff.AppendLine($"         `source` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '来源',")
            StrBuff.AppendLine($"         `module` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模块',")
            StrBuff.AppendLine($"         `version` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本',")
            StrBuff.AppendLine($"         `completed` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '完成时间',")
            StrBuff.AppendLine($"         `category_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '需求分类',")
            StrBuff.AppendLine($"         `parent_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '父需求',")
            StrBuff.AppendLine($"         `children_id` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '子需求',")
            StrBuff.AppendLine($"         `ancestor_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '根需求',")
            StrBuff.AppendLine($"         `business_value` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '业务价值',")
            StrBuff.AppendLine($"         `effort` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预估工时',")
            StrBuff.AppendLine($"         `effort_completed` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '完成工时',")
            StrBuff.AppendLine($"         `exceed` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '超出工时',")
            StrBuff.AppendLine($"         `remain` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '剩余工时',")
            StrBuff.AppendLine($"         `release_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发布计划',")
            StrBuff.AppendLine($"         `custom_field_one` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段1',")
            StrBuff.AppendLine($"         `custom_field_two` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段2',")
            StrBuff.AppendLine($"         `custom_field_three` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段3',")
            StrBuff.AppendLine($"         `custom_field_four` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段4',")
            StrBuff.AppendLine($"         `custom_field_five` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段5',")
            StrBuff.AppendLine($"         `custom_field_six` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段6',")
            StrBuff.AppendLine($"         `custom_field_seven` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段7',")
            StrBuff.AppendLine($"         `custom_field_eight` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段8',")
            StrBuff.AppendLine($"         `custom_field_9` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段9',")
            StrBuff.AppendLine($"         `custom_field_10` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段10',")
            StrBuff.AppendLine($"         `custom_field_11` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段11',")
            StrBuff.AppendLine($"         `custom_field_12` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段12',")
            StrBuff.AppendLine($"         `custom_field_13` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段13',")
            StrBuff.AppendLine($"         `custom_field_14` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段14',")
            StrBuff.AppendLine($"         `custom_field_15` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段15',")
            StrBuff.AppendLine($"         `custom_field_16` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段16',")
            StrBuff.AppendLine($"         `custom_field_17` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段17',")
            StrBuff.AppendLine($"         `custom_field_18` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段18',")
            StrBuff.AppendLine($"         `custom_field_19` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段19',")
            StrBuff.AppendLine($"         `custom_field_20` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段20',")
            StrBuff.AppendLine($"         `custom_field_21` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段21',")
            StrBuff.AppendLine($"         `custom_field_22` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段22',")
            StrBuff.AppendLine($"         `custom_field_23` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段23',")
            StrBuff.AppendLine($"         `custom_field_24` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段24',")
            StrBuff.AppendLine($"         `custom_field_25` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段25',")
            StrBuff.AppendLine($"         `custom_field_26` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段26',")
            StrBuff.AppendLine($"         `custom_field_27` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段27',")
            StrBuff.AppendLine($"         `custom_field_28` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段28',")
            StrBuff.AppendLine($"         `custom_field_29` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段29',")
            StrBuff.AppendLine($"         `custom_field_30` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段30',")
            StrBuff.AppendLine($"         `custom_field_31` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段31',")
            StrBuff.AppendLine($"         `custom_field_32` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段32',")
            StrBuff.AppendLine($"         `custom_field_33` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段33',")
            StrBuff.AppendLine($"         `custom_field_34` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段34',")
            StrBuff.AppendLine($"         `custom_field_35` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段35',")
            StrBuff.AppendLine($"         `custom_field_36` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段36',")
            StrBuff.AppendLine($"         `custom_field_37` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段37',")
            StrBuff.AppendLine($"         `custom_field_38` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段38',")
            StrBuff.AppendLine($"         `custom_field_39` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段39',")
            StrBuff.AppendLine($"         `custom_field_40` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段40',")
            StrBuff.AppendLine($"         `custom_field_41` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段41',")
            StrBuff.AppendLine($"         `custom_field_42` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段42',")
            StrBuff.AppendLine($"         `custom_field_43` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段43',")
            StrBuff.AppendLine($"         `custom_field_44` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段44',")
            StrBuff.AppendLine($"         `custom_field_45` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段45',")
            StrBuff.AppendLine($"         `custom_field_46` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段46',")
            StrBuff.AppendLine($"         `custom_field_47` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段47',")
            StrBuff.AppendLine($"         `custom_field_48` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段48',")
            StrBuff.AppendLine($"         `custom_field_49` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段49',")
            StrBuff.AppendLine($"         `custom_field_50` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段50',")
            StrBuff.AppendLine($"         `custom_field_51` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段51',")
            StrBuff.AppendLine($"         `custom_field_52` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段52',")
            StrBuff.AppendLine($"         `custom_field_53` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段53',")
            StrBuff.AppendLine($"         `custom_field_54` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段54',")
            StrBuff.AppendLine($"         `custom_field_55` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段55',")
            StrBuff.AppendLine($"         `custom_field_56` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段56',")
            StrBuff.AppendLine($"         `custom_field_57` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段57',")
            StrBuff.AppendLine($"         `custom_field_58` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段58',")
            StrBuff.AppendLine($"         `custom_field_59` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段59',")
            StrBuff.AppendLine($"         `custom_field_60` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段60',")
            StrBuff.AppendLine($"         `custom_field_61` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段61',")
            StrBuff.AppendLine($"         `custom_field_62` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段62',")
            StrBuff.AppendLine($"         `custom_field_63` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段63',")
            StrBuff.AppendLine($"         `custom_field_64` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段64',")
            StrBuff.AppendLine($"         `custom_field_65` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段65',")
            StrBuff.AppendLine($"         `custom_field_66` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段66',")
            StrBuff.AppendLine($"         `custom_field_67` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段67',")
            StrBuff.AppendLine($"         `custom_field_68` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段68',")
            StrBuff.AppendLine($"         `custom_field_69` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段69',")
            StrBuff.AppendLine($"         `custom_field_70` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段70',")
            StrBuff.AppendLine($"         `custom_field_71` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段71',")
            StrBuff.AppendLine($"         `custom_field_72` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段72',")
            StrBuff.AppendLine($"         `custom_field_73` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段73',")
            StrBuff.AppendLine($"         `custom_field_74` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段74',")
            StrBuff.AppendLine($"         `custom_field_75` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段75',")
            StrBuff.AppendLine($"         `custom_field_76` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段76',")
            StrBuff.AppendLine($"         `custom_field_77` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段77',")
            StrBuff.AppendLine($"         `custom_field_78` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段78',")
            StrBuff.AppendLine($"         `custom_field_79` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段79',")
            StrBuff.AppendLine($"         `custom_field_80` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段80',")
            StrBuff.AppendLine($"         `custom_field_81` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段81',")
            StrBuff.AppendLine($"         `custom_field_82` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段82',")
            StrBuff.AppendLine($"         `custom_field_83` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段83',")
            StrBuff.AppendLine($"         `custom_field_84` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段84',")
            StrBuff.AppendLine($"         `custom_field_85` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段85',")
            StrBuff.AppendLine($"         `custom_field_86` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段86',")
            StrBuff.AppendLine($"         `custom_field_87` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段87',")
            StrBuff.AppendLine($"         `custom_field_88` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段88',")
            StrBuff.AppendLine($"         `custom_field_89` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段89',")
            StrBuff.AppendLine($"         `custom_field_90` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段90',")
            StrBuff.AppendLine($"         `custom_field_91` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段91',")
            StrBuff.AppendLine($"         `custom_field_92` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段92',")
            StrBuff.AppendLine($"         `custom_field_93` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段93',")
            StrBuff.AppendLine($"         `custom_field_94` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段94',")
            StrBuff.AppendLine($"         `custom_field_95` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段95',")
            StrBuff.AppendLine($"         `custom_field_96` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段96',")
            StrBuff.AppendLine($"         `custom_field_97` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段97',")
            StrBuff.AppendLine($"         `custom_field_98` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段98',")
            StrBuff.AppendLine($"         `custom_field_99` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段99',")
            StrBuff.AppendLine($"         `custom_field_100` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段100',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '需求地址',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     07、初始化缺陷表
        ''' </summary>
        Private Shared Sub Init_tapd_bugs()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_bugs`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_bugs`;")
            StrBuff.AppendLine($"       CREATE TABLE `tapd_bugs`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ID',")
            StrBuff.AppendLine($"         `title` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '标题',")
            StrBuff.AppendLine($"         `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '详细描述',")
            StrBuff.AppendLine($"         `priority` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '优先级',")
            StrBuff.AppendLine($"         `severity` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '严重程度',")
            StrBuff.AppendLine($"         `module` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模块',")
            StrBuff.AppendLine($"         `status` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态',")
            StrBuff.AppendLine($"         `reporter` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',")
            StrBuff.AppendLine($"         `deadline` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '解决期限',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `bugtype` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '缺陷类型',")
            StrBuff.AppendLine($"         `resolved` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '解决时间',")
            StrBuff.AppendLine($"         `closed` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关闭时间',")
            StrBuff.AppendLine($"         `modified` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改时间',")
            StrBuff.AppendLine($"         `lastmodify` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改人',")
            StrBuff.AppendLine($"         `auditer` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '审核人',")
            StrBuff.AppendLine($"         `de` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开发人员',")
            StrBuff.AppendLine($"         `version_test` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '验证版本',")
            StrBuff.AppendLine($"         `version_report` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发现版本',")
            StrBuff.AppendLine($"         `version_close` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关闭版本',")
            StrBuff.AppendLine($"         `version_fix` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '合入版本',")
            StrBuff.AppendLine($"         `baseline_find` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发现基线',")
            StrBuff.AppendLine($"         `baseline_join` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '合入基线',")
            StrBuff.AppendLine($"         `baseline_close` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关闭基线',")
            StrBuff.AppendLine($"         `baseline_test` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '验证基线',")
            StrBuff.AppendLine($"         `sourcephase` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '引入阶段',")
            StrBuff.AppendLine($"         `te` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测试人员',")
            StrBuff.AppendLine($"         `current_owner` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前处理人',")
            StrBuff.AppendLine($"         `iteration_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '迭代',")
            StrBuff.AppendLine($"         `resolution` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '解决方法',")
            StrBuff.AppendLine($"         `source` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '缺陷根源',")
            StrBuff.AppendLine($"         `originphase` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发现阶段',")
            StrBuff.AppendLine($"         `confirmer` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '验证人',")
            StrBuff.AppendLine($"         `milestone` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '里程碑',")
            StrBuff.AppendLine($"         `participator` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参与人',")
            StrBuff.AppendLine($"         `closer` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关闭人',")
            StrBuff.AppendLine($"         `platform` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '软件平台',")
            StrBuff.AppendLine($"         `os` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作系统',")
            StrBuff.AppendLine($"         `testtype` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测试类型',")
            StrBuff.AppendLine($"         `testphase` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测试阶段',")
            StrBuff.AppendLine($"         `frequency` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '重现规律',")
            StrBuff.AppendLine($"         `cc` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '抄送人',")
            StrBuff.AppendLine($"         `regression_number` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修订编号',")
            StrBuff.AppendLine($"         `flows` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '流动',")
            StrBuff.AppendLine($"         `feature` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '特征',")
            StrBuff.AppendLine($"         `testmode` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测试方式',")
            StrBuff.AppendLine($"         `estimate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预估工时',")
            StrBuff.AppendLine($"         `issue_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '确认者ID',")
            StrBuff.AppendLine($"         `created_from` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '从xx中创建',")
            StrBuff.AppendLine($"         `in_progress_time` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '接受处理时间',")
            StrBuff.AppendLine($"         `verify_time` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '验证时间',")
            StrBuff.AppendLine($"         `reject_time` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '拒绝时间',")
            StrBuff.AppendLine($"         `reopen_time` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '重新打开时间',")
            StrBuff.AppendLine($"         `audit_time` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '审核时间',")
            StrBuff.AppendLine($"         `suspend_time` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '挂起时间',")
            StrBuff.AppendLine($"         `due` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预计结束',")
            StrBuff.AppendLine($"         `begin` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预计开始',")
            StrBuff.AppendLine($"         `release_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发布编号',")
            StrBuff.AppendLine($"         `custom_field_one` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段1',")
            StrBuff.AppendLine($"         `custom_field_two` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段2',")
            StrBuff.AppendLine($"         `custom_field_three` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段3',")
            StrBuff.AppendLine($"         `custom_field_four` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段4',")
            StrBuff.AppendLine($"         `custom_field_five` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段5',")
            StrBuff.AppendLine($"         `custom_field_6` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段6',")
            StrBuff.AppendLine($"         `custom_field_7` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段7',")
            StrBuff.AppendLine($"         `custom_field_8` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段8',")
            StrBuff.AppendLine($"         `custom_field_9` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段9',")
            StrBuff.AppendLine($"         `custom_field_10` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段10',")
            StrBuff.AppendLine($"         `custom_field_11` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段11',")
            StrBuff.AppendLine($"         `custom_field_12` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段12',")
            StrBuff.AppendLine($"         `custom_field_13` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段13',")
            StrBuff.AppendLine($"         `custom_field_14` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段14',")
            StrBuff.AppendLine($"         `custom_field_15` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段15',")
            StrBuff.AppendLine($"         `custom_field_16` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段16',")
            StrBuff.AppendLine($"         `custom_field_17` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段17',")
            StrBuff.AppendLine($"         `custom_field_18` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段18',")
            StrBuff.AppendLine($"         `custom_field_19` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段19',")
            StrBuff.AppendLine($"         `custom_field_20` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段20',")
            StrBuff.AppendLine($"         `custom_field_21` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段21',")
            StrBuff.AppendLine($"         `custom_field_22` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段22',")
            StrBuff.AppendLine($"         `custom_field_23` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段23',")
            StrBuff.AppendLine($"         `custom_field_24` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段24',")
            StrBuff.AppendLine($"         `custom_field_25` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段25',")
            StrBuff.AppendLine($"         `custom_field_26` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段26',")
            StrBuff.AppendLine($"         `custom_field_27` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段27',")
            StrBuff.AppendLine($"         `custom_field_28` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段28',")
            StrBuff.AppendLine($"         `custom_field_29` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段29',")
            StrBuff.AppendLine($"         `custom_field_30` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段30',")
            StrBuff.AppendLine($"         `custom_field_31` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段31',")
            StrBuff.AppendLine($"         `custom_field_32` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段32',")
            StrBuff.AppendLine($"         `custom_field_33` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段33',")
            StrBuff.AppendLine($"         `custom_field_34` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段34',")
            StrBuff.AppendLine($"         `custom_field_35` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段35',")
            StrBuff.AppendLine($"         `custom_field_36` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段36',")
            StrBuff.AppendLine($"         `custom_field_37` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段37',")
            StrBuff.AppendLine($"         `custom_field_38` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段38',")
            StrBuff.AppendLine($"         `custom_field_39` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段39',")
            StrBuff.AppendLine($"         `custom_field_40` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段40',")
            StrBuff.AppendLine($"         `custom_field_41` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段41',")
            StrBuff.AppendLine($"         `custom_field_42` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段42',")
            StrBuff.AppendLine($"         `custom_field_43` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段43',")
            StrBuff.AppendLine($"         `custom_field_44` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段44',")
            StrBuff.AppendLine($"         `custom_field_45` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段45',")
            StrBuff.AppendLine($"         `custom_field_46` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段46',")
            StrBuff.AppendLine($"         `custom_field_47` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段47',")
            StrBuff.AppendLine($"         `custom_field_48` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段48',")
            StrBuff.AppendLine($"         `custom_field_49` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段49',")
            StrBuff.AppendLine($"         `custom_field_50` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段50',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '缺陷地址',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     08、初始化任务表
        ''' </summary>
        Private Shared Sub Init_tapd_tasks()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_tasks`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_tasks`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ID',")
            StrBuff.AppendLine($"         `name` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '标题',")
            StrBuff.AppendLine($"         `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '详细描述',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `creator` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `modified` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改时间',")
            StrBuff.AppendLine($"         `status` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态',")
            StrBuff.AppendLine($"         `owner` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '当前处理人',")
            StrBuff.AppendLine($"         `cc` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '抄送人',")
            StrBuff.AppendLine($"         `begin` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预计开始',")
            StrBuff.AppendLine($"         `due` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预计结束',")
            StrBuff.AppendLine($"         `story_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '需求',")
            StrBuff.AppendLine($"         `iteration_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '迭代',")
            StrBuff.AppendLine($"         `priority` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '优先级',")
            StrBuff.AppendLine($"         `progress` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '进度',")
            StrBuff.AppendLine($"         `completed` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '完成时间',")
            StrBuff.AppendLine($"         `effort_completed` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '完成工时',")
            StrBuff.AppendLine($"         `effort_total` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消耗工时',")
            StrBuff.AppendLine($"         `exceed` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '超出工时',")
            StrBuff.AppendLine($"         `remain` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '剩余工时',")
            StrBuff.AppendLine($"         `effort` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '预估工时',")
            StrBuff.AppendLine($"         `custom_field_one` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段1',")
            StrBuff.AppendLine($"         `custom_field_two` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段2',")
            StrBuff.AppendLine($"         `custom_field_three` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段3',")
            StrBuff.AppendLine($"         `custom_field_four` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段4',")
            StrBuff.AppendLine($"         `custom_field_five` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段5',")
            StrBuff.AppendLine($"         `custom_field_six` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段6',")
            StrBuff.AppendLine($"         `custom_field_seven` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段7',")
            StrBuff.AppendLine($"         `custom_field_eight` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段8',")
            StrBuff.AppendLine($"         `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '任务地址',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     09、初始化测试计划表
        ''' </summary>
        Private Shared Sub Init_tapd_test_plans()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_test_plans`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_test_plans`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'id',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用例名称',")
            StrBuff.AppendLine($"         `description` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '需求分类描述',")
            StrBuff.AppendLine($"         `version` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本',")
            StrBuff.AppendLine($"         `owner` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测试负责人',")
            StrBuff.AppendLine($"         `status` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用例状态',")
            StrBuff.AppendLine($"         `type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测试类型',")
            StrBuff.AppendLine($"         `start_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开始时间',")
            StrBuff.AppendLine($"         `end_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '结束时间',")
            StrBuff.AppendLine($"         `creator` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `modified` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改时间',")
            StrBuff.AppendLine($"         `modifier` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改人',")
            StrBuff.AppendLine($"         `custom_field_1` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段1',")
            StrBuff.AppendLine($"         `custom_field_2` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段2',")
            StrBuff.AppendLine($"         `custom_field_3` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段3',")
            StrBuff.AppendLine($"         `custom_field_4` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段4',")
            StrBuff.AppendLine($"         `custom_field_5` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段5',")
            StrBuff.AppendLine($"         `custom_field_6` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段6',")
            StrBuff.AppendLine($"         `custom_field_7` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段7',")
            StrBuff.AppendLine($"         `custom_field_8` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段8',")
            StrBuff.AppendLine($"         `custom_field_9` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段9',")
            StrBuff.AppendLine($"         `custom_field_10` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段10',")
            StrBuff.AppendLine($"         `custom_field_11` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段11',")
            StrBuff.AppendLine($"         `custom_field_12` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段12',")
            StrBuff.AppendLine($"         `custom_field_13` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段13',")
            StrBuff.AppendLine($"         `custom_field_14` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段14',")
            StrBuff.AppendLine($"         `custom_field_15` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段15',")
            StrBuff.AppendLine($"         `custom_field_16` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段16',")
            StrBuff.AppendLine($"         `custom_field_17` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段17',")
            StrBuff.AppendLine($"         `custom_field_18` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段18',")
            StrBuff.AppendLine($"         `custom_field_19` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段19',")
            StrBuff.AppendLine($"         `custom_field_20` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段20',")
            StrBuff.AppendLine($"         `custom_field_21` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段21',")
            StrBuff.AppendLine($"         `custom_field_22` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段22',")
            StrBuff.AppendLine($"         `custom_field_23` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段23',")
            StrBuff.AppendLine($"         `custom_field_24` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段24',")
            StrBuff.AppendLine($"         `custom_field_25` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段25',")
            StrBuff.AppendLine($"         `custom_field_26` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段26',")
            StrBuff.AppendLine($"         `custom_field_27` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段27',")
            StrBuff.AppendLine($"         `custom_field_28` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段28',")
            StrBuff.AppendLine($"         `custom_field_29` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段29',")
            StrBuff.AppendLine($"         `custom_field_30` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段30',")
            StrBuff.AppendLine($"         `custom_field_31` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段31',")
            StrBuff.AppendLine($"         `custom_field_32` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段32',")
            StrBuff.AppendLine($"         `custom_field_33` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段33',")
            StrBuff.AppendLine($"         `custom_field_34` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段34',")
            StrBuff.AppendLine($"         `custom_field_35` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段35',")
            StrBuff.AppendLine($"         `custom_field_36` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段36',")
            StrBuff.AppendLine($"         `custom_field_37` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段37',")
            StrBuff.AppendLine($"         `custom_field_38` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段38',")
            StrBuff.AppendLine($"         `custom_field_39` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段39',")
            StrBuff.AppendLine($"         `custom_field_40` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段40',")
            StrBuff.AppendLine($"         `custom_field_41` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段41',")
            StrBuff.AppendLine($"         `custom_field_42` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段42',")
            StrBuff.AppendLine($"         `custom_field_43` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段43',")
            StrBuff.AppendLine($"         `custom_field_44` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段44',")
            StrBuff.AppendLine($"         `custom_field_45` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段45',")
            StrBuff.AppendLine($"         `custom_field_46` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段46',")
            StrBuff.AppendLine($"         `custom_field_47` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段47',")
            StrBuff.AppendLine($"         `custom_field_48` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段48',")
            StrBuff.AppendLine($"         `custom_field_49` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段49',")
            StrBuff.AppendLine($"         `custom_field_50` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段50',")
            StrBuff.AppendLine($"         `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测试计划地址',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     10、初始化测试用例表
        ''' </summary>
        Private Shared Sub Init_tapd_tcases()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_tcases`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_tcases`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'id',")
            StrBuff.AppendLine($"         `steps` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '用例步骤',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `category_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用例目录',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `modifier` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改人',")
            StrBuff.AppendLine($"         `modified` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改时间',")
            StrBuff.AppendLine($"         `creator` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',")
            StrBuff.AppendLine($"         `status` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用例状态',")
            StrBuff.AppendLine($"         `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用例名称',")
            StrBuff.AppendLine($"         `precondition` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '前置条件',")
            StrBuff.AppendLine($"         `expectation` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '预期结果',")
            StrBuff.AppendLine($"         `type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用例类型',")
            StrBuff.AppendLine($"         `priority` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用例等级',")
            StrBuff.AppendLine($"         `custom_field_1` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段1',")
            StrBuff.AppendLine($"         `custom_field_2` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段2',")
            StrBuff.AppendLine($"         `custom_field_3` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段3',")
            StrBuff.AppendLine($"         `custom_field_4` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段4',")
            StrBuff.AppendLine($"         `custom_field_5` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段5',")
            StrBuff.AppendLine($"         `custom_field_6` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段6',")
            StrBuff.AppendLine($"         `custom_field_7` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段7',")
            StrBuff.AppendLine($"         `custom_field_8` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段8',")
            StrBuff.AppendLine($"         `custom_field_9` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段9',")
            StrBuff.AppendLine($"         `custom_field_10` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段10',")
            StrBuff.AppendLine($"         `custom_field_11` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段11',")
            StrBuff.AppendLine($"         `custom_field_12` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段12',")
            StrBuff.AppendLine($"         `custom_field_13` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段13',")
            StrBuff.AppendLine($"         `custom_field_14` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段14',")
            StrBuff.AppendLine($"         `custom_field_15` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段15',")
            StrBuff.AppendLine($"         `custom_field_16` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段16',")
            StrBuff.AppendLine($"         `custom_field_17` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段17',")
            StrBuff.AppendLine($"         `custom_field_18` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段18',")
            StrBuff.AppendLine($"         `custom_field_19` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段19',")
            StrBuff.AppendLine($"         `custom_field_20` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段20',")
            StrBuff.AppendLine($"         `custom_field_21` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段21',")
            StrBuff.AppendLine($"         `custom_field_22` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段22',")
            StrBuff.AppendLine($"         `custom_field_23` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段23',")
            StrBuff.AppendLine($"         `custom_field_24` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段24',")
            StrBuff.AppendLine($"         `custom_field_25` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段25',")
            StrBuff.AppendLine($"         `custom_field_26` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段26',")
            StrBuff.AppendLine($"         `custom_field_27` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段27',")
            StrBuff.AppendLine($"         `custom_field_28` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段28',")
            StrBuff.AppendLine($"         `custom_field_29` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段29',")
            StrBuff.AppendLine($"         `custom_field_30` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段30',")
            StrBuff.AppendLine($"         `custom_field_31` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段31',")
            StrBuff.AppendLine($"         `custom_field_32` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段32',")
            StrBuff.AppendLine($"         `custom_field_33` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段33',")
            StrBuff.AppendLine($"         `custom_field_34` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段34',")
            StrBuff.AppendLine($"         `custom_field_35` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段35',")
            StrBuff.AppendLine($"         `custom_field_36` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段36',")
            StrBuff.AppendLine($"         `custom_field_37` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段37',")
            StrBuff.AppendLine($"         `custom_field_38` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段38',")
            StrBuff.AppendLine($"         `custom_field_39` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段39',")
            StrBuff.AppendLine($"         `custom_field_40` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段40',")
            StrBuff.AppendLine($"         `custom_field_41` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段41',")
            StrBuff.AppendLine($"         `custom_field_42` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段42',")
            StrBuff.AppendLine($"         `custom_field_43` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段43',")
            StrBuff.AppendLine($"         `custom_field_44` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段44',")
            StrBuff.AppendLine($"         `custom_field_45` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段45',")
            StrBuff.AppendLine($"         `custom_field_46` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段46',")
            StrBuff.AppendLine($"         `custom_field_47` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段47',")
            StrBuff.AppendLine($"         `custom_field_48` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段48',")
            StrBuff.AppendLine($"         `custom_field_49` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段49',")
            StrBuff.AppendLine($"         `custom_field_50` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段50',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测试用例地址',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     11、初始化需求变更历史表
        ''' </summary>
        Private Shared Sub Init_tapd_story_changes()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_story_changes`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_story_changes`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'id',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `creator` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人（操作人）',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间（变更时间）',")
            StrBuff.AppendLine($"         `change_summary` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '需求变更描述',")
            StrBuff.AppendLine($"         `comment` longtext CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '评论',")
            StrBuff.AppendLine($"         `changes` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '变更详细记录',")
            StrBuff.AppendLine($"         `entity_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '变更的对象类型',")
            StrBuff.AppendLine($"         `story_id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '需求ID',")
            StrBuff.AppendLine($"         `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '需求地址',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     12、初始化缺陷变更历史表
        ''' </summary>
        Private Shared Sub Init_tapd_bug_changes()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_bug_changes`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_bug_changes`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'id',")
            StrBuff.AppendLine($"         `bug_id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '缺陷ID',")
            StrBuff.AppendLine($"         `author` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '变更人',")
            StrBuff.AppendLine($"         `field` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '变更字段',")
            StrBuff.AppendLine($"         `old_value` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '变更前',")
            StrBuff.AppendLine($"         `new_value` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '变更后',")
            StrBuff.AppendLine($"         `memo` longtext CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '缺陷地址',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     13、初始化发布评审表
        ''' </summary>
        Private Shared Sub Init_tapd_launch_forms()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_launch_forms`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_launch_forms`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据 ID (url 上的 id)',")
            StrBuff.AppendLine($"         `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题',")
            StrBuff.AppendLine($"         `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '评审 ID (非数据 ID)',")
            StrBuff.AppendLine($"         `creator` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目',")
            StrBuff.AppendLine($"         `status` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态',")
            StrBuff.AppendLine($"         `version_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本类型',")
            StrBuff.AppendLine($"         `baseline` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '基线',")
            StrBuff.AppendLine($"         `release_model` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发布模块',")
            StrBuff.AppendLine($"         `roadmap_version` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本',")
            StrBuff.AppendLine($"         `release_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发布类型',")
            StrBuff.AppendLine($"         `change_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '变更类型',")
            StrBuff.AppendLine($"         `signed_by` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '签发人',")
            StrBuff.AppendLine($"         `archived_by` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '发布确认人',")
            StrBuff.AppendLine($"         `cc` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '抄送人',")
            StrBuff.AppendLine($"         `change_notifier` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '变更通知人',")
            StrBuff.AppendLine($"         `signed` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '签发时间',")
            StrBuff.AppendLine($"         `archived` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '归档时间',")
            StrBuff.AppendLine($"         `signer_result` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '签发结论',")
            StrBuff.AppendLine($"         `signer_comment` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '签发意见',")
            StrBuff.AppendLine($"         `release_result` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '确认结果',")
            StrBuff.AppendLine($"         `release_comment` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '确认意见',")
            StrBuff.AppendLine($"         `test_path` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '测试路径',")
            StrBuff.AppendLine($"         `created_path` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '归档路径',")
            StrBuff.AppendLine($"         `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',")
            StrBuff.AppendLine($"         `participator` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '参与人',")
            StrBuff.AppendLine($"         `template_id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模版id',")
            StrBuff.AppendLine($"         `custom_field_one` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段1',")
            StrBuff.AppendLine($"         `custom_field_two` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段2',")
            StrBuff.AppendLine($"         `custom_field_three` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段3',")
            StrBuff.AppendLine($"         `custom_field_four` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段4',")
            StrBuff.AppendLine($"         `custom_field_five` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段5',")
            StrBuff.AppendLine($"         `custom_field_six` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段6',")
            StrBuff.AppendLine($"         `custom_field_seven` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段7',")
            StrBuff.AppendLine($"         `custom_field_eight` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段8',")
            StrBuff.AppendLine($"         `custom_field_9` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段9',")
            StrBuff.AppendLine($"         `custom_field_10` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段10',")
            StrBuff.AppendLine($"         `custom_field_11` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段11',")
            StrBuff.AppendLine($"         `custom_field_12` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段12',")
            StrBuff.AppendLine($"         `custom_field_13` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段13',")
            StrBuff.AppendLine($"         `custom_field_14` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段14',")
            StrBuff.AppendLine($"         `custom_field_15` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段15',")
            StrBuff.AppendLine($"         `custom_field_16` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段16',")
            StrBuff.AppendLine($"         `custom_field_17` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段17',")
            StrBuff.AppendLine($"         `custom_field_18` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段18',")
            StrBuff.AppendLine($"         `custom_field_19` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段19',")
            StrBuff.AppendLine($"         `custom_field_20` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '自定义字段20',")
            StrBuff.AppendLine($"         `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发布评审地址',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub


        ''' <summary>
        '''     14、初始化发布计划表
        ''' </summary>
        Private Shared Sub Init_tapd_releases()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_releases`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_releases`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'id',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题',")
            StrBuff.AppendLine($"         `description` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '详细描述',")
            StrBuff.AppendLine($"         `startdate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开始时间',")
            StrBuff.AppendLine($"         `enddate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '结束时间',")
            StrBuff.AppendLine($"         `creator` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '结束时间',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `modified` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改时间',")
            StrBuff.AppendLine($"         `status` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态',")
            StrBuff.AppendLine($"         `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发布计划地址',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     15、初始化关联关系表
        ''' </summary>
        Private Shared Sub Init_tapd_relations()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_relations`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_relations`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主键ID',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `source_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联关系源对象类型',")
            StrBuff.AppendLine($"         `source_id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联关系源对象id',")
            StrBuff.AppendLine($"         `target_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联关系目标对象类型',")
            StrBuff.AppendLine($"         `target_id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联关系目标对象id',")
            StrBuff.AppendLine($"         `modified` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改时间',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联关系地址',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     16、初始化模块表
        ''' </summary>
        Private Shared Sub Init_tapd_modules()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_modules`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_modules`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'id',")
            StrBuff.AppendLine($"         `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题',")
            StrBuff.AppendLine($"         `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '详细描述',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `owner` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责人',")
            StrBuff.AppendLine($"         `xdefault` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '默认',")
            StrBuff.AppendLine($"         `sort` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '排序',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     17、初始化花费表
        ''' </summary>
        Private Shared Sub Init_tapd_timesheets()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_timesheets`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_timesheets`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci Not NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'id',")
            StrBuff.AppendLine($"         `entity_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '对象类型，如story、task等',")
            StrBuff.AppendLine($"         `entity_id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '对象ID',")
            StrBuff.AppendLine($"         `timespent` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '花费工时',")
            StrBuff.AppendLine($"         `spentdate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '花费日期',")
            StrBuff.AppendLine($"         `owner` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '花费创建人',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `memo` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '花费描述',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     18、初始化迭代表
        ''' </summary>
        Private Shared Sub Init_tapd_iterations()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_iterations`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_iterations`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ID',")
            StrBuff.AppendLine($"         `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `startdate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开始时间',")
            StrBuff.AppendLine($"         `enddate` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '结束时间',")
            StrBuff.AppendLine($"         `status` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态',")
            StrBuff.AppendLine($"         `release_id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发布ID',")
            StrBuff.AppendLine($"         `description` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '详细描述',")
            StrBuff.AppendLine($"         `creator` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `modified` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后修改时间',")
            StrBuff.AppendLine($"         `completed` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '完成时间',")
            StrBuff.AppendLine($"         `custom_field_1` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段1',")
            StrBuff.AppendLine($"         `custom_field_2` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段2',")
            StrBuff.AppendLine($"         `custom_field_3` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段3',")
            StrBuff.AppendLine($"         `custom_field_4` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段4',")
            StrBuff.AppendLine($"         `custom_field_5` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段5',")
            StrBuff.AppendLine($"         `custom_field_6` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段6',")
            StrBuff.AppendLine($"         `custom_field_7` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段7',")
            StrBuff.AppendLine($"         `custom_field_8` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段8',")
            StrBuff.AppendLine($"         `custom_field_9` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段9',")
            StrBuff.AppendLine($"         `custom_field_10` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段10',")
            StrBuff.AppendLine($"         `custom_field_11` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段11',")
            StrBuff.AppendLine($"         `custom_field_12` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段12',")
            StrBuff.AppendLine($"         `custom_field_13` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段13',")
            StrBuff.AppendLine($"         `custom_field_14` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段14',")
            StrBuff.AppendLine($"         `custom_field_15` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段15',")
            StrBuff.AppendLine($"         `custom_field_16` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段16',")
            StrBuff.AppendLine($"         `custom_field_17` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段17',")
            StrBuff.AppendLine($"         `custom_field_18` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段18',")
            StrBuff.AppendLine($"         `custom_field_19` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段19',")
            StrBuff.AppendLine($"         `custom_field_20` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段20',")
            StrBuff.AppendLine($"         `custom_field_21` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段21',")
            StrBuff.AppendLine($"         `custom_field_22` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段22',")
            StrBuff.AppendLine($"         `custom_field_23` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段23',")
            StrBuff.AppendLine($"         `custom_field_24` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段24',")
            StrBuff.AppendLine($"         `custom_field_25` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段25',")
            StrBuff.AppendLine($"         `custom_field_26` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段26',")
            StrBuff.AppendLine($"         `custom_field_27` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段27',")
            StrBuff.AppendLine($"         `custom_field_28` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段28',")
            StrBuff.AppendLine($"         `custom_field_29` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段29',")
            StrBuff.AppendLine($"         `custom_field_30` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段30',")
            StrBuff.AppendLine($"         `custom_field_31` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段31',")
            StrBuff.AppendLine($"         `custom_field_32` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段32',")
            StrBuff.AppendLine($"         `custom_field_33` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段33',")
            StrBuff.AppendLine($"         `custom_field_34` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段34',")
            StrBuff.AppendLine($"         `custom_field_35` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段35',")
            StrBuff.AppendLine($"         `custom_field_36` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段36',")
            StrBuff.AppendLine($"         `custom_field_37` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段37',")
            StrBuff.AppendLine($"         `custom_field_38` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段38',")
            StrBuff.AppendLine($"         `custom_field_39` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段39',")
            StrBuff.AppendLine($"         `custom_field_40` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段40',")
            StrBuff.AppendLine($"         `custom_field_41` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段41',")
            StrBuff.AppendLine($"         `custom_field_42` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段42',")
            StrBuff.AppendLine($"         `custom_field_43` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段43',")
            StrBuff.AppendLine($"         `custom_field_44` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段44',")
            StrBuff.AppendLine($"         `custom_field_45` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段45',")
            StrBuff.AppendLine($"         `custom_field_46` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段46',")
            StrBuff.AppendLine($"         `custom_field_47` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段47',")
            StrBuff.AppendLine($"         `custom_field_48` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段48',")
            StrBuff.AppendLine($"         `custom_field_49` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段49',")
            StrBuff.AppendLine($"         `custom_field_50` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '自定义字段50',")
            StrBuff.AppendLine($"         `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '迭代地址',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub

        ''' <summary>
        '''     19、初始化评论表
        ''' </summary>
        Private Shared Sub Init_tapd_comments()
            Dim SqlList As New List(Of SqlData)
            Dim StrBuff As New StringBuilder
            StrBuff.AppendLine($"       DROP TABLE IF EXISTS `tapd_comments`;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            StrBuff= New StringBuilder
            StrBuff.AppendLine($"       CREATE TABLE `tapd_comments`  (")
            StrBuff.AppendLine($"         `sysid` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',")
            StrBuff.AppendLine($"         `id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '评论ID',")
            StrBuff.AppendLine($"         `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题',")
            StrBuff.AppendLine($"         `description` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '内容',")
            StrBuff.AppendLine($"         `author` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '评论人',")
            StrBuff.AppendLine($"         `entry_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '评论类型（取值： bug、 bug_remark （流转缺陷时候的评论）、 stories、 tasks 。多个类型间以竖线隔开）',")
            StrBuff.AppendLine($"         `entry_id` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '评论所依附的业务对象实体id',")
            StrBuff.AppendLine($"         `created` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',")
            StrBuff.AppendLine($"         `modified` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最后更改时间',")
            StrBuff.AppendLine($"         `workspace_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目ID',")
            StrBuff.AppendLine($"         `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '评论地址',")
            StrBuff.AppendLine($"         `collect_date` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采集日期',")
            StrBuff.AppendLine($"         PRIMARY KEY (`sysid`) USING BTREE")
            StrBuff.AppendLine($"       ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;")
            SqlList.Add(New SqlData(StrBuff.ToString(),Nothing))
            ExcuteInit(SqlList)
        End Sub
        Private Shared Function ExcuteInit(ByVal SqlList As List(Of SqlData)) As Boolean
            Dim data As IDataAccess = DbFactory.CreateConnection("TapdCollect")
            Dim result = 1
            Try
                data.Open()
                data.BeginTran()
                For Each sql As SqlData In SqlList
                    IM_Log.Showlog($"执行Sql语句：{IM_AppPath.NewLine()}{sql.SqlSting}", MsgType.DebugMsg)
                    data.ExecuteNonQuery(sql.SqlSting,sql.SqlParm)
                Next
                data.CommitTran()
            Catch ex As Exception
                data.RollBackTran()
                IM_Log.Showlog(ex.ToString(), MsgType.ErrorMsg)
                result = 0
            Finally
                data.Close()
            End Try
            If result = 1 Then
                Return True
            Else
                Return False
            End If
        End Function
    End Class
End NameSpace